/**
  常量模块
**/
const constant = {
	serverUrl: "http://127.0.0.1:8082/QLH-Api",
	cacheskey: {
		jwttoken: "jwttoken",
		user: "user",
		menus: "menus",
		codes: "codes"
	},
	msg: {
		icon: {
			success: 1,
			fail: 2,
			info: 8,
			exception: 5
		}
	},
	response: {
		code: {
			success: 1000,
			fail: 1001,
			exception: 1002,
			nologin: 1003,
			noauth: 1004,
			badtoken: 1005,
			flusntoken: 1006,
		}
	},
	page: {
		limits: [1, 5, 10, 15, 20, 25, 50, 100, 500, 10000],
		limit: 10,
		layout: "total, sizes, prev, pager, next, jumper",
		toUri: function(obj) {
			var tmp = null;
			if (obj) {
				tmp = {
					current: obj.curr,
					size: obj.limit
				}
			} else {
				tmp = {
					current: 1,
					size: 10
				}
			}
			return tmp;
		}
	}
};

export default constant;
